package com.hksj.common.core.enums;

public enum DeviceType {
    device("直连设备"),
    childrenDevice("网关子设备"),
    gateway("网关设备");

    private final String text;

    DeviceType(String text) {
        this.text = text;
    }

    public String getValue() {
        return name();
    }

    public String getText(String name){
        for (DeviceType deviceType : DeviceType.values()) {
            if (deviceType.name().equals(name)) {
                return deviceType.text;
            }
        }
        return null;
    }

}
